/*长连接测试1：创建一个客户端持续给服务器发送数据，直到超过超时时间看看是否正常*/

#include "../http.hpp"

int main(void)
{
    Socket cli_sock;
    cli_sock.CreateClient(8500, "127.0.0.1");
    std::string req = "GET /heool HTTP/1.1\r\nConnection: keep-alive\r\nConnection-Length: 0\r\n\r\n";
    while (true)
    {
        assert(cli_sock.Send(req.c_str(), req.size()) != -1);
        char buffer[1024];
        assert(cli_sock.Recv(buffer, 1023));
        DBG_LOG("[%s]", buffer);
        sleep(3);
    }

    return 0;
}